{include file='imobile_header.tpl'}

<div id="topbar">
  <div id="leftnav">
    <a href="user_home.php"><img alt="home" src="./include/imobile/iwebkit/images/home.png" /></a>
  </div> 
  <div id="title"> 
    {lang_print id=11340086}
  </div>
  <div id="bluerightbutton"><a href="javascript:iMobile_toggleFilter('#content','#contentlist');">{lang_print id=11340057}</a></div>
</div>

<div id="content" style="display: none">
  
  <span class="graytitle">{lang_print id=11340059}</span>
  <form action="articles.php" action="POST">
  <ul class="pageitem"> 
    <li class="bigfield">
      <input placeholder="{lang_print id=11150630}" type="text" name="keyword" value="{$keyword}" />
    </li> 
    <li class="bigfield">
      <input placeholder="{lang_print id=11150632}" type="text" name="tag" value="{$tag}" />
    </li>     
    <li class="select">
       <select name="s">
		    <option value="date" {if $s=='date'}selected="selected"{/if}>{lang_print id=11150625}</option>
		    <option value="view" {if $s=='view'}selected="selected"{/if}>{lang_print id=11150626}</option>
		    <option value="title" {if $s=='title'}selected="selected"{/if}>{lang_print id=11150627}</option>
      </select>
    </li>
    <li class="select">
      <select name="articlecat_id">
        <option value="">{lang_print id=11150612}</option>
		  {section name=cat_loop loop=$categories}
		    <option value="{$categories[cat_loop].articlecat_id}" {if $categories[cat_loop].articlecat_id == $articlecat_id}selected="selected"{/if}>{$categories[cat_loop].articlecat_title}</option>
		      {section name=subcat_loop loop=$categories[cat_loop].articlecat_subcats}
		        <option value="{$categories[cat_loop].articlecat_subcats[subcat_loop].subcategory_id}" {if $categories[cat_loop].articlecat_subcats[subcat_loop].subcategory_id == $articlecat_id}selected="selected"{/if}> - {$categories[cat_loop].articlecat_subcats[subcat_loop].subcategory_title}</option>
		      {/section}
		    </div>
		  {/section}
		  </select>
    </li>
  </ul>
  
    <div class="iButtons">
      <input name="submit" type="submit" value="{lang_print id=11340060}" class="iPush" /></li>
    </div>
  
  </form>
</div>

<div id="contentlist">


  {if $total_articles == 0}
    
    <div class="boxinfo"> 
      {lang_print id=11150610}
    </div>  
  {else}
  
  <div id="tributton"> 
    <div class="links"> 
      {if $p != 1}<a href='articles.php?{if $owner->user_exists}user={$owner->user_info.user_username}&{/if}{if $keyword != ""}keyword={$keyword}&{/if}{if $tag != ""}tag={$tag}&{/if}{if $f == 1}f=1&{/if}s={$s}&articlecat_id={$articlecat_id}&p={math equation='p-1' p=$p}'>{lang_print id=182}</a>{else}<a href='articles.php?{if $owner->user_exists}user={$owner->user_info.user_username}&{/if}{if $keyword != ""}keyword={$keyword}&{/if}{if $tag != ""}tag={$tag}&{/if}{if $f == 1}f=1&{/if}s={$s}&articlecat_id={$articlecat_id}&p=1'>{lang_print id=182}</a>{/if}<a href="articles.php">Home</a>{if $p != $maxpage}<a href='articles.php?{if $owner->user_exists}user={$owner->user_info.user_username}&{/if}{if $keyword != ""}keyword={$keyword}&{/if}{if $tag != ""}tag={$tag}&{/if}{if $f == 1}f=1&{/if}s={$s}&articlecat_id={$articlecat_id}&p={math equation='p+1' p=$p}'>{lang_print id=183}</a>{else}<a href='articles.php?{if $owner->user_exists}user={$owner->user_info.user_username}&{/if}{if $keyword != ""}keyword={$keyword}&{/if}{if $tag != ""}tag={$tag}&{/if}{if $f == 1}f=1&{/if}s={$s}&articlecat_id={$articlecat_id}&p={$maxpage}'>{lang_print id=183}</a>{/if}
      </div> 
  </div>   
    <div class="page_stats">
      {if $p_start == $p_end}
        {lang_sprintf id=184 1=$p_start 2=$total_articles}
      {else}
        {lang_sprintf id=185 1=$p_start 2=$p_end 3=$total_articles}
      {/if}
    </div>
    <ul class="entries">  
    {foreach from=$article_array item=articleentry}
	    {assign var='article_title' value=$articleentry.article->article_info.article_title}
	    {assign var='article_date_start' value=$datetime->timezone($articleentry.article->article_info.article_date_start, $global_timezone)}
	    
	    {assign var=start_dateformat value="`$setting.setting_dateformat`, `$setting.setting_timeformat`"}
	    
        <li class="entry">
          <a class="entry_title" href='{$url->url_create('article',$user->user_info.user_username,$articleentry.article->article_info.article_id,$articleentry.article->article_info.article_slug)}'>{$articleentry.article->article_info.article_title|truncate:70:"...":true}</a>
          <span class='entry_meta'>
              {lang_print id=11150611} {$datetime->cdate("`$start_dateformat`", $article_date_start)} 
              {* {lang_print id=11150613} <a href='{$url->url_create('profile', $articleentry.article->article_info.user_username)}'>{$articleentry.article_author->user_displayname}</a> *}
          </span>
        </li>
    {/foreach}
    </ul>

  {/if}


</div>


{include file='imobile_footer.tpl'}

